Factorization of polynomials

In mathematics and computer algebra, polynomial factorization refers to factoring a polynomial into irreducible polynomials over a given field.

Contents

Formulation of the question

Other factorizations, such as square-free factorization exist, but the irreducible factorization, the most common, is the subject of this article.

Factorization depends strongly on the choice of field. For example, the fundamental theorem of algebra, which states that all polynomials with complex coefficients have complex roots, implies that a polynomial with integer coefficients can be completely reduced to linear factors over the complex field C.

On the other hand, such a polynomial may only be reducible to linear and quadratic factors over the real field R. Over the rational number field Q, it is possible that no factorization at all may be possible. From a more practical vantage point, the fundamental theorem is only an existence proof, and offers little insight into the common problem of actually finding the roots of a given polynomial.

Factoring over the integers and rationals

It can be shown that factoring over Q (the rational numbers) can be reduced to factoring over Z (the integers). This is a specific example of a more general case — factoring over a field of fractions can be reduced to factoring over the corresponding integral domain. This algebraic point goes by the name of Gauss's lemma.

The classic proof, due to Gauss, first factors a polynomial into its content, a rational number, and its primitive part, a polynomial whose coefficients are pure integers and share no common divisor among them. Any polynomial with rational coefficients can be factored in this way, using a content composed of the greatest common divisor of the numerators, and the least common multiple of the denominators. This factorization is unique.

For example,


10x^2 %2B 5x %2B 5 = 5 (2x^2 %2B x %2B 1) \,

and


\frac{1}{3}x^5 %2B \frac{7}{2} x^2 %2B 2x %2B 1 = \frac{1}{6} ( 2x^5 %2B 21x^2 %2B 12x %2B 6)

since \mathrm{GCD}(1,7,2,1)=1 and \mathrm{LCM}(3,2)=6.

Now, any polynomial with rational coefficients can be split into a content and a primitive polynomial, and in particular the factors of any factorization (over Q) of such a polynomial can also be so split. Since the content and the primitive polynomials are unique, and since the product of primitive polynomials is itself primitive, the primitive part of the polynomial must factor into the primitive parts of the factors. In particular, if a polynomial with integer coefficients can be factored at all, it can be factored into integer polynomials. So factoring a polynomial with rational coefficients can be reduced to finding integer factorizations of its primitive part.

Obtaining linear factors

All linear factors with rational coefficients can be found using the rational root test. If the polynomial to be factored is a_nx^n %2B a_{n-1}x^{n-1} %2B \cdots %2B a_1x %2B a_0, then all possible linear factors are of the form (x-\tfrac{b_1}{b_2}), where b_1 is an integer factor of a_0 and b_2 is an integer factor of a_n. All possible combinations of integer factors can be tested for validity, and each valid one can be factored out using polynomial long division. If the original polynomial is the product of factors at least which two of which are of degree 2 or higher, this technique will only provide a partial factorization; otherwise the factorization will be complete. Note that in the case of a cubic polynomial, if the cubic is factorable at all the rational root test will give a complete factorization, either into a linear factor and an irreducible quadratic factor, or into three linear factors.

Factorizing quartics

Reducible quartic (fourth degree) polynomials with no linear factors can be factored into quadratics.

Duplicate factors

If two or more factors of a polynomial are identical to each other, a situation resulting in multiple roots, then one can exploit the fact that the duplicated factor will also be a factor of the polynomial's derivative, which itself is a polynomial of one lower degree. The duplicated factor(s) can be found by using the Euclidean algorithm to find the greatest common factor of the original polynomial and its derivative.

Kronecker's method

Since integer polynomials must factor into integer polynomial factors, and evaluating integer polynomials at integer values must produce integers, the integer values of a polynomial can be factored in only a finite number of ways, and produce only a finite number of possible polynomial factors.

For example, consider

f(x) = x^5 %2B x^4 %2B x^2 %2B x %2B 2.

If this polynomial factors over Z, then at least one of its factors must be of degree two or less. We need three values to uniquely fit a second degree polynomial. We'll use f(0) = 2, f(1) = 6 and f(-1) = 2. Now, 2 can only factor as

1×2, 2×1, (−1)×(−2), or (−2)×(−1).

Therefore, if a second degree integer polynomial factor exists, it must take one of the values

1, 2, −1, or −2

at x=0, and likewise at x=-1. There are eight different ways to factor 6, so there are

4×4×8 = 128

possible combinations, of which half can be discarded as the negatives of the other half, corresponding to 64 possible second degree integer polynomials which must be checked. These are the only possible integer polynomial factors of f(x). Testing them exhaustively reveals that

g(x) = x^2 %2B x %2B 1

constructed from g(0)=1, g(1)=3 and g(-1)=1, factors f(x).

(Van der Waerden, Sections 5.4 and 5.6)

LLL algorithm

The LLL algorithm (Lenstra, Lenstra & Lovász 1982), was the first polynomial time algorithm for factoring rational polynomials, and uses the Lenstra–Lenstra–Lovász lattice basis reduction algorithm.

One variation of their algorithm runs as follows: calculate a complex (or p-adic) root α of the polynomial P to high precision, then use the Lenstra–Lenstra–Lovász lattice basis reduction algorithm to find an approximate linear relation between 1, α, α2, α3, ... with integer coefficients, which with luck will be an exact linear relation and a polynomial factor of P.

Factoring over finite fields

See Factorization of polynomial over finite field and irreducibility tests, Berlekamp's algorithm, and Cantor–Zassenhaus algorithm.

Factoring over algebraic extensions

We can factor a polynomial p(x) \in K[x] , where K is a finite field extension of \mathbb{Q}. First we eliminate any repeated factors in p(x) by taking greatest common divisors with its derivative. Next we write L= K[x]/p(x) explicitly as an algebra over \mathbb{Q}. We next pick a random element \alpha \in L. By the primitive element theorem, \alpha generates L over \mathbb{Q} with high probability. If this is the case, we can compute the minimal polynomial, q(y)\in \mathbb{Q}[y] of \alpha over \mathbb{Q}. Factoring

q(y) = \prod_{i=1}^{n} q_i(y)

over \mathbb{Q}[y], we determine that

L = \mathbb{Q}[\alpha] = \mathbb{Q}[y]/q(y) = \prod_{i=1}^n \mathbb{Q}[y]/q_i(y)

(notice that L is reduced since p(x) is), where \alpha corresponds to the element (y,y,\ldots,y). Note that this is the unique decomposition of L as a product fields. Hence this decomposition is the same as

\prod_{i=1}^m K[x]/p_i(x)

where

p(x) = \prod_{i=1}^m p_i(x)

is the factorization of p(x) over K[x]. By writing x\in L and generators of K as a polynomials in \alpha, we can determine the embeddings of x and K into the components \mathbb{Q}[y]/q_i(y)=K[x]/p_i(x). By finding the minimal polynomial of x in this ring, we have computed p_i(x), and thus factored p(x) over K.

See also

Bibliography